package com.itheima.String;

public class Equals {
    public static void main(String[] args) {
//        String s1 = "abc";
//        String s2 = "ABC";
//        String s3 = "abc";
//
//        //equals区分大小写
//        boolean b = s1.equals(s2);
//        boolean b1 = s1.equals(s3);
//        System.out.println(b);
//        System.out.println(b1);
//
//        //equalsIgnoreCase不区分大小写
//        boolean b2 = s1.equalsIgnoreCase(s2);
//        boolean b3 = s1.equalsIgnoreCase(s3);
//        System.out.println(b2);
//        System.out.println(b3);
        String s1 = "abc";
        String s2 = "abc";
        String s3 = "ABC";
        String s4 = "a";
        String s5 = s4 + "bc";
        System.out.println(s1.equals(s2));
        System.out.println(s1.equalsIgnoreCase(s3));
        System.out.println(s2.equals(s5));
        System.out.println(s3.equalsIgnoreCase(s5));
    }
}
